
package com.admissions.model;

import java.util.ArrayList;

public class CauHoi {
    public static final String ID = "id";
    
    public static final String CAUHOI = "cauhoi";

    public String item;

    public String content;

    float mark;

    public ArrayList<DapAn> dapans;

    public float getTotalMark() {
        for (DapAn dapAn : dapans) {
            if (dapAn.isChecked && dapAn.isCorrect) {
                return mark;
            }
        }
        return 0;
    }

    public CauHoi(String item, String content, ArrayList<DapAn> dapans) {
        this.item = item;
        this.content = content;
        this.dapans = dapans;
    }
}
